// 定义接口类型
interface Endpoints {
  CHAT_QUERY: string;
  CHAT_UPDATE: string;
  CHAT_INSERT: string;
  CHAT_DELETE: string;
  CHAT_HISTORY: string;
}

// 开发环境配置
const devEndpoints: Endpoints = {
  CHAT_QUERY: '/chat/get',
  CHAT_UPDATE: '/chat/update',
  CHAT_INSERT: '/chat/insert',
  CHAT_DELETE: '/chat/delete',
  CHAT_HISTORY: '/chat/insertHistory'
};

// 生产环境配置
const prodEndpoints: Endpoints = {
  CHAT_QUERY: '/wgs/nrec-api/case/beijing_server/chat/getChatsByUser',
  CHAT_UPDATE: '/wgs/nrec-api/case/beijing_server/chat/updateChat',
  CHAT_INSERT: '/wgs/nrec-api/case/beijing_server/chat/insertChatData',
  CHAT_DELETE: '/wgs/nrec-api/case/beijing_server/chat/deleteChat',
  CHAT_HISTORY: '/wgs/nrec-api/case/beijing_server/chat/insertHistory'
};

// 根据环境变量选择配置
const endpoints: Endpoints = import.meta.env.PROD
  ? prodEndpoints 
  : devEndpoints;

export default endpoints;